home *** CD-ROM | disk | FTP | other *** search
/ PC World 2000 February / PCWorld_2000-02_cd.bin / Software / Vyzkuste / xsetup / _SETUP.2 / Group3 / XQ MSO2K Folders 2.xpl < prev    next >
Text File  |  1999-09-25  |  2KB  |  76 lines

  1. "FILE"="Xteq Systems X-Setup Plugin 5.0"
  2. "TYPE"="4"
  3. "COUNT"="4"
  4. "UIPATH"="System\File System\Folders: Data"
  5. "NAME"="Office 2000 Folders #2"
  6. "VERSION"="1.13"
  7. "LANGUAGE"="VBScript"
  8. "TEXT 1"="Word Files Dir"
  9. "TEXT 2"="PowerPoint Dir"
  10. "TEXT 3"="Publisher Dir"
  11. "TEXT 4"="Publisher Pic. Dir"
  12. "DESCRIPTION 1"="With this plug-in, you can change the default path for your files. When set, the program will use the configured folder as default for the file requester."
  13. "DESCRIPTION 2"="Please exit all Office programs before changing these settings."
  14. "AUTHOR"="Xteq Systems"
  15. "COPYRIGHT"="Copyright ⌐ Xteq Systems - All Rights Reserved"
  16. "COMMENT 1"="For more information, go to http://www.xteq.com or write to TeXHeX@xteq.com."
  17.  
  18.  
  19. sP="HKEY_CURRENT_USER\Software\Policies\Microsoft\Office\9.0\Common\General\"
  20.  
  21. 'STR W9x - xSTR WNT
  22. sWWD="HKEY_CURRENT_USER\Software\Policies\Microsoft\Office\9.0\Word\Options\DOC-PATH"
  23. sPPT="HKEY_CURRENT_USER\Software\Policies\Microsoft\Office\9.0\PowerPoint\RecentFolderList\Default"
  24. sPUB1="HKEY_CURRENT_USER\Software\Policies\Microsoft\Office\9.0\Publisher\Doc_Path"
  25. sPUB2="HKEY_CURRENT_USER\Software\Policies\Microsoft\Office\9.0\Publisher\Picture_Path"
  26.  
  27. sPCheck="HKCU\Software\Microsoft\Office\9.0\"
  28. Sub Plugin_Initialize 
  29. if RegPathExists(sPCheck) then
  30.   s=RegReadValue(sWWD)
  31.   SetUIElement 1,s
  32.  
  33.   s=RegReadValue(sPPT)
  34.   SetUIElement 2,s
  35.  
  36.   s=RegReadValue(sPUB1)
  37.   SetUIElement 3,s
  38.  
  39.   s=RegReadValue(sPUB2)
  40.   SetUIElement 4,s
  41. else
  42.   Disable
  43. end if
  44. End Sub
  45.  
  46. Sub Plugin_CheckData(ElementIndex)
  47. End Sub
  48.  
  49. Sub Plugin_Apply(ElementIndex,ElementSubIndex)
  50.  Call Wrt(1,sWWD)
  51.  Call Wrt(2,sPPT)
  52.  Call Wrt(3,sPUB1)
  53.  Call Wrt(4,sPUB2)
  54.  
  55.  Call Logoff()
  56. End Sub
  57.  
  58.  
  59. Sub Wrt(ITM,VAL)
  60.  s=GetUIElement(ITM)
  61.  if len(s)>0 then 
  62.   
  63.     if Right(s,1)="\" then
  64.        s=left(s,len(s)-1)
  65.     end if
  66.     Call RegWriteValue(VAL,s,1)
  67.  else
  68.     s=RegReadValue(VAL)
  69.     if IsEmpty(s)=false then Call RegDeleteValue(VAL)
  70.  end if
  71. end sub
  72.  
  73.  
  74. Sub Plugin_Terminate 
  75. End Sub
  76.